package com.thread.concurrent.executorservice;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Demo2 {
	public static void main(String[] args) {
		ExecutorService pool =  Executors.newCachedThreadPool();
		for (int i = 1; i <= 10; i++) {
			pool.execute(new Runnable() {
				
				public void run() {
					System.out.println(Thread.currentThread().getName());
				}
			});
		}
		pool.shutdown();
	}
}
